package com.wzz.config;

import cn.hutool.crypto.digest.DigestUtil;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author DarkClown
 * @date 2024-08-12 15:34
 * @project_name day0812-month
 * @parem
 **/
@Configuration
public class RabbitConfig {
    @Bean
    public Queue addQueue(){
        return new Queue("addQueue",true);
    }

    @Bean
    public DirectExchange directExchange(){
        return new DirectExchange("addEx");
    }

    @Bean
    public Binding binding(){
        return BindingBuilder.bind(addQueue()).to(directExchange()).with("addKey");
    }

}
